package org.sample.entity;

import org.sample.entity.enums.CheckState;

import javax.persistence.*;

/**
 * Created by Alan on 2016/10/1.
 */
@Entity
public class Channel extends BaseBO {

    private Channel parent;
    private String name;
    private String info;
    private Integer rankNo;
    private Boolean isSingle;
    private Boolean showNavbar;
    private Boolean showHome;
    private Integer visitTotal;
    private CheckState checkState;

    public Channel() {
    }

    public Channel(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "parent_id")
    public Channel getParent() {
        return parent;
    }

    public void setParent(Channel parent) {
        this.parent = parent;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "info")
    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    @Column(name = "rank_no")
    public Integer getRankNo() {
        return rankNo;
    }

    public void setRankNo(Integer rankNo) {
        this.rankNo = rankNo;
    }

    @Column(name = "is_single")
    public Boolean getIsSingle() {
        return isSingle;
    }

    public void setIsSingle(Boolean isSingle) {
        this.isSingle = isSingle;
    }

    @Column(name = "show_navbar")
    public Boolean getShowNavbar() {
        return showNavbar;
    }

    public void setShowNavbar(Boolean showNavbar) {
        this.showNavbar = showNavbar;
    }

    @Column(name = "show_home")
    public Boolean getShowHome() {
        return showHome;
    }

    public void setShowHome(Boolean showHome) {
        this.showHome = showHome;
    }

    @Column(name = "visit_total")
    public Integer getVisitTotal() {
        return visitTotal;
    }

    public void setVisitTotal(Integer visitTotal) {
        this.visitTotal = visitTotal;
    }

    @Column(name = "check_state")
    public CheckState getCheckState() {
        return checkState;
    }

    public void setCheckState(CheckState checkState) {
        this.checkState = checkState;
    }

}
